'''
Created on Mar 3, 2016

@author: JimmyMo
'''
import time
import inspect
import threading
class Reader(threading.Thread):
    def __init__(self, queue, raw_options):
        super().__init__(name="t_reader")
        self._parse_options(raw_options)
        self.data = queue
        pass
    
#     def read(self):
#         real_class_name =  self.__class__.__name__
#         now = time.clock()
#         time.clock()
#         logs = self._read()
#         elapsed = time.clock() - now
#         print("%s reading took %fs" % (real_class_name, elapsed))
#         return logs
    
    def _parse_options(self, raw_options):
        '''abstract method'''
        class_name = self.__class__.__name__
        method_name = inspect.stack()[0][3]
        raise Exception("%s method in class %s is abstract method which is not implemented..." % (method_name, class_name))
        
#     def _read(self):
#         '''abstract method'''
#         class_name = self.__class__.__name__
#         method_name = inspect.stack()[0][3]
#         raise Exception("%s method in class %s is abstract method which is not implemented..." % (method_name, class_name))
